# tup = (1, "a")
# del tup
# print(tup[0])

# 关键字 python 保留字  userInfo
# NumberList = [1]
# NumberList.append(2)
# NumberList.insert(0, 3)
# NumberList.extend([4, 5, 6])
# print(NumberList)

# dic  = {
#     "name": "king",
#     "age": 18,
#     "addr": "beijing"
# }
# print(dic.values())
# print("kings" in dic.keys())


# def fun(name="王勇", age=28):
#     print(name, age)
#
#
# fun(name="wangyong")
# fun("king", 18)
# fun(age=20, name="king")


# def fun(*args, **kwargs):
#     print(args)
#     print(kwargs)
#
#
# fun(1, 2, 3, name="king", age=18)


# 阅读性太差
# Sum = lambda x, y: x + y
#
# print(Sum(1, 2))


# 类 class
"""
 pass 占位符
 函数->方法
 变量->属性
 一个集合具体公共的功能，写到成一个类
"""


class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def walk(self):
        print(self.name)
        print(self.age)

    def eat(self):
        print("%s 在吃" % self.name)

    def __setName(self):
        return self.name+"___"

    def getName(self):
        return self.__setName()


class eTong(Person):
    def ku(self):
        print("%s 在哭" % self.name)

    def eat(self):
        print("小孩子喝奶~~~")


# per = Person("king", 18)
# per.walk()
# per.eat()


er = eTong("king", 18)
er.walk()
er.eat()
# er.__setName()
